package com.hexinfo.dmpro.admin.dao;

import com.hexinfo.dmpro.common.base.BaseRequest;
import com.hexinfo.dmpro.admin.model.Menu;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Set;

/**
 * @ClassName MenuMapper
 * @Describe
 * @Author ml.wang
 * @Date 2021-06-16
 */
@Mapper
public interface MenuMapper {

    List<Menu> queryAll(BaseRequest baseRequest);

    List<Menu> findByRoles(@Param("roleIds") Set<Long> roleIds);

    List<Menu> findByPid(@Param("pid") Long pid);

    Menu findById(@Param("id") Long id);

    Menu findByName(@Param("name") String name);

    Menu findByComponentName(@Param("componentName") String componentName);

    Integer isExistByName(@Param("name") String name);

    Integer isExistByComponentName(@Param("componentName") String componentName);

    void save(Menu menu);

    void modify(Menu menu);

    void delete(@Param("menuSet") Set<Menu> menuSet);


}

